package com.yimi.appstore.download2;

import java.io.File;
import java.io.IOException;

import com.yimi.appstore.util.GlobalConsts;

public class DownloadEntity {

	private int _id;
	private String url;
	private String fileName;
	private String localPath;
	private long totalBytes;
	private long currentBytes;
	private String resource ; //名称
	private String iconUrl;
	private String mediaType ;
	public DownloadEntity(){
		
	}

	public DownloadEntity(int _id, String url, String fileName, String localPath, int totalBytes, int currentBytes , String resource, String iconUrl , String mediaType) {
		super();
		File dir = new File(GlobalConsts.APP_SAVESDK_PATH);
		if (!dir.exists())
			dir.mkdirs();
		File temp = new File(localPath);
		try {
			temp.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
		}
		this._id = _id;
		this.url = url;
		this.fileName = fileName;
		this.localPath = localPath;
		this.totalBytes = totalBytes;
		this.currentBytes = currentBytes;
		this.resource = resource;
		this.iconUrl = iconUrl;
		this.mediaType = mediaType;
	}

	public int get_id() {
		return _id;
	}

	public void set_id(int _id) {
		this._id = _id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getLocalPath() {
		return localPath;
	}

	public void setLocalPath(String localPath) {
		this.localPath = localPath;
	}

	public long getTotalBytes() {
		return totalBytes;
	}

	public void setTotalBytes(long totalBytes) {
		this.totalBytes = totalBytes;
	}

	public long getCurrentBytes() {
		return currentBytes;
	}

	public void setCurrentBytes(long currentBytes) {
		this.currentBytes = currentBytes;
	}

	public String getIconUrl() {
		return iconUrl;
	}

	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	public String getMediaType() {
		return mediaType;
	}

	public void setMediaType(String mediaType) {
		this.mediaType = mediaType;
	}

	public String getResource() {
		return resource;
	}

	public void setResource(String resource) {
		this.resource = resource;
	}

}
